cmake_minimum_required(VERSION 3.13)
project(VanTideL_CPP)

set(CMAKE_CXX_STANDARD 11)

# 定义源文件 *.c
aux_source_directory(Include INCLUDE)
aux_source_directory(VM VM)
aux_source_directory(Parser PARSER)
aux_source_directory(Cli CLI)
aux_source_directory(Object OBJECT)
aux_source_directory(Compiler COMPILER)
# 显示源文件路径
set(SCR_SOUCES_LIST ${INCLUDE} ${VM} ${PARSER} ${CLI} ${OBJECT} ${COMPILER})
message("\r\n-----[SCR_SOUCES_PATH]-----")
foreach (SOURCE_PATH ${SCR_SOUCES_LIST})
    message("--> ${SOURCE_PATH}")
endforeach ()
message("-----[END_MESSAGES]-----\r\n")

# 定义头文件 *.h
file(GLOB_RECURSE SCR_HEADER_PATH "*.hpp" "*.h")
message("-----[SCR_HEADER_PATH]-----")
foreach (HEADER_PATH ${SCR_HEADER_PATH})
    message("--> ${HEADER_PATH}")
endforeach ()
message("-----[END_MESSAGES]-----\r\n")

LINK_LIBRARIES(m)

include_directories(include VM Parser Cli Object Compiler)

add_executable(VanTideL_CPP ${SCR_SOUCES_LIST} ${SCR_HEADER_PATH} main.cpp)

add_executable(VanTideL_Token_CPP ${SCR_SOUCES_LIST} ${SCR_HEADER_PATH} main_token.cpp)
